package com.qianf.wisdomOrientation.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qianf.wisdomOrientation.entity.Message;
import com.qianf.wisdomOrientation.mapper.MessageMapper;
import com.qianf.wisdomOrientation.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author mkHeart
 * @since 2021-07-08
 */
@Service
public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message> implements MessageService {
    @Autowired
    private MessageMapper mapper;

    @Override
    public List<Message> findAllMessage() {
        return mapper.findAllMessage();
    }

    @Override
    public Message findMessageById(int id) {
        return mapper.findMessageById(id);
    }

    @Override
    public List<Message>  findMessageReply(int messageid) {
        return mapper.findMessageReply(messageid);
    }

    @Override
    public int addMessage(Message message) {
         return mapper.addMessage(message);
    }
}
